A Gold Pass Member asked how he would go about drawing vertical lines, 26 bars left and 26 bars right from a bar chosen by a mouse click.<br /><br />Such an analysis technique needs three elements:<br /><br />1) To be able to detect when a bar is clicked on the chart<br />2) To clear vertical lines drawn when a previous bar was clicked<br />3) To create and draw vertical line drawing objects<br /><br />In this tutorial, rather than hard-coding the number of bars before and after the bar clicked, the number is determined by a user input (Gap) as are the weight and thickness of the vertical lines.<br /><br />The colors of the lines are hard-coded but could easily be changed.<br /><br />Technical lessons include:<br />Using the ChartingHost class to determine when a bar is clicked<br />Creating BNPoints for the bars where we draw Vertical lines<br />Clearing and adding VerticalLines to the chart<br />Modifying the weight and style of the vertical lines<br /><br />See: https://markplex.com/free-tutorials/tutorial-194-drawing-vertical-lines-to-left-and-right-of-a-clicked-bar/